home *** CD-ROM | disk | FTP | other *** search
/ PC-Blue - MS DOS Public Domain Library / PC-Blue MS-DOS Public Domain Library - NYACC.iso / vol049 / addlf.bas next >
Encoding:
BASIC Source File  |  1987-01-11  |  682 b   |  20 lines

  1. 5 'Public domain program to add linefeeds to downloaded files.
  2. 6 'Download files without LF's overwirte the same line when listed.
  3. 7 'Written by Don Withrow, 1982
  4. 10 CLS:LOCATE 10,1,1
  5. 20 INPUT"Filename that needs linefeeds (without drive)";FILEONE$
  6. 30 PRINT
  7. 35 INPUT"Drive file is on (without colon)";DRIVE$:DRIVE$=DRIVE$+":"
  8. 40 OPEN DRIVE$+FILEONE$ FOR INPUT AS #1
  9. 50 OPEN DRIVE$+"temp" FOR OUTPUT AS #2
  10. 60 IF EOF(1) THEN 90 ELSE LINE INPUT#1, THELIN$
  11. 70 PRINT #2, THELIN$
  12. 80 GOTO 60
  13. 90 CLOSE
  14. 91 KILL DRIVE$+FILEONE$
  15. 92 NAME DRIVE$+"temp" AS DRIVE$+FILEONE$
  16. 95 PRINT
  17. 97 PRINT "File ";FILEONE$;" now has linefeeds after carriage returns."
  18. 98 PRINT:PRINT
  19. 100 END
  20.